<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		#div1{
			width: 50px;
			height: 50px;
			position: absolute;
			background: red;
			border-radius: 50%;
		}
	</style>
	<script type="text/javascript">
		document.onmousemove=function(ev){
			//v鼠标跟随提示
			var oEvent = ev||event;
			var oDiv=document.getElementById('div1');
             
            //可视区域的
			var scrollTop = document.documentElement.scrollTop||document.body.scrollTop;



			oDiv.style.left=oEvent.clientX+'px';
			oDiv.style.top=oEvent.clientY+scrollTop+'px';


		}
	</script>
</head>
<body style="height: 2000px;">
	<div id="div1"></div>
</body>
</html>